package com.sdgakj.foton.cloud.dictionary.base.bean;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;

import java.io.Serializable;

/**
 * 药品品类entity
 *
 * @author zhaozhe
 * @Date 2018-07-04 14:50
 */
@Data
@TableName("erp_product_type")
public class ProductType{

    private static final long serialVersionUID = 1L;

	 /**
	 * 商品类型
	 *
	 */
	@TableId(value = "id",type = IdType.AUTO)
	private String id;

	 /**
	 * 名称
	 *
	 */
	@TableField(value="name")
	private String name;

	/**
	 * 当前页
	 */
	@TableField(exist = false)
	private int current=1;

	/**
	 * 分页开始下标
	 */
	@TableField(exist = false)
	private int startIndex;

	/**
	 * 每页显示条数
	 */
	@TableField(exist = false)
	private int size;

	/**
	 * 是否是新记录
	 */
	@TableField(exist = false)
	private boolean isNewRecord = false;

	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return ReflectionToStringBuilder.toString(this);
	}
}
